package com.tencent.cloud.uikit.widget.textview;

import android.content.Context;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
import android.view.Gravity;

import com.tencent.cloud.uikit.R;

/**
 * @author vinsonhuang
 * @date 2018/6/26
 */
public class TitleTextView extends AppCompatTextView {
    public TitleTextView(Context context) {
        super(context);
        init();
    }

    public TitleTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public TitleTextView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init();
    }

    public void init() {
        setTextAppearance(getContext(), R.style.TitleTextStyle);
        setGravity(Gravity.CENTER_HORIZONTAL);
    }

}
